package net.csdra.personnel.service;

import net.csdra.basis.Utils;
import net.csdra.basis.domain.CJpaRepository;
import net.csdra.basis.service.CurrentUserInfo;
import net.csdra.basis.service.ServiceBaseInterfaceImpl;
import net.csdra.personnel.domain.Volunteer;
import net.csdra.personnel.domain.VolunteerRepository;
import net.csdra.personnel.service.form.CreateVolunteer;
import net.csdra.personnel.service.form.UpdateVolunteer;

/**
 * Created by msf on 2018/1/31.
 */
public class VolunteerManageServiceImpl extends ServiceBaseInterfaceImpl<Volunteer, CreateVolunteer, UpdateVolunteer> implements VolunteerManageService {
    VolunteerRepository jpaRepository;

    public VolunteerManageServiceImpl(VolunteerRepository jpaRepository, CurrentUserInfo currentUserInfo) {
        super(Volunteer.class, jpaRepository, currentUserInfo);
        this.jpaRepository = jpaRepository;
    }

//    @Override
//    public Volunteer create(CreateVolunteer createVolunteer) {
//        //.TODO 补充断言
//        Volunteer volunteer = super.create(createVolunteer);
//        //TODO 补充剩余属性
//        jpaRepository.save(volunteer);
//        return Utils.createReturnValue(Volunteer.class, volunteer);
//    }
//
//    @Override
//    public Volunteer update(UpdateVolunteer updateVolunteer) {
//        //.TODO 补充断言
//        Volunteer volunteer = super.update(updateVolunteer);
//        //TODO 补充剩余属性
//        jpaRepository.save(volunteer);
//        return Utils.createReturnValue(Volunteer.class, volunteer);
//    }
}
